package com.geekgo.lucenepp.util;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class DateUtil {
	
	private final static Logger log = LoggerFactory.getLogger(DateUtil.class);
	
	
	//获取当前时间
	public static long getDate(){
		return System.currentTimeMillis();
	}
	
	public static void timeConsuming(String name,long time){
		long timeUse = (getDate() - time);
		log.info("{}--->执行耗时:{}毫秒即{}秒",name,timeUse,BigDecimalUtil.divide(Double.valueOf(timeUse), Double.valueOf(1000L)));
	}
}
